
<style>

    .default,.blue{
        box-shadow: none;
        border: 1px solid;
        text-decoration: none;
        color: #fff;
        display: inline-block;
        padding: 6px 12px;
        margin-bottom: 0;
        font-size: 14px;
        font-weight: 400;
        line-height: 1.42857143;
        text-align: center;
        white-space: nowrap;
        vertical-align: middle;
        -ms-touch-action: manipulation;
        touch-action: manipulation;
        cursor: pointer;
    }
    .blue{
        background: #3c8dbc;
        color: #fff;
    }
</style>




<div class="x-body">
    <form class="layui-form form_single" id="form" action="{:url()}" method="post">
        <div class="layui-form-item">
            <label for="username" class="layui-form-label">
                用户名
            </label>
            <div class="layui-input-block">
                <textarea id="username" class="layui-textarea" name="username"     rows="10" placeholder="会员账号或者手机号 1个账号一行记录 "></textarea>
            </div>
            <!--<div class="layui-form-mid layui-word-aux">-->
            <!--(文章描述信息/简介)-->
            <!--</div>-->
        </div>

        <div class="layui-form-item">
            <label for="money" class="layui-form-label">
                订单金额
            </label>
            <div class="layui-input-block">
                <textarea id="money" class="layui-textarea" name="money"    rows="10" placeholder="生成金额 1个金额一行记录，行数要跟会员一致 "></textarea>
            </div>
            <!--<div class="layui-form-mid layui-word-aux">-->
            <!--(文章描述信息/简介)-->
            <!--</div>-->
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">
                <span class="x-red">*</span>币种
            </label>
            <div class="layui-input-block">
               <select name="wallet_id" lay-filter="aihao">
                   <option value=""   >全部</option>
                   {volist name="wallet" id="vo"}
                   <option value="{$vo.id}-{$vo.parities}"   >{$vo.name}</option>
                   {/volist}

               </select>
            </div>
            <div class="layui-form-mid layui-word-aux">
                (币种)
            </div>

        </div>
        <div class="layui-form-item">
            <label for="money" class="layui-form-label">
                币种价格
            </label>
            <div class="layui-input-block">
                <input type="number" id="price" name="price"
                autocomplete="off" class="layui-input">
            </div>
            <!--<div class="layui-form-mid layui-word-aux">-->
            <!--(文章描述信息/简介)-->
            <!--</div>-->
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">
                <span class="x-red">*</span>收款方式
            </label>
            <div class="layui-input-block">
                <input type="checkbox" name="pay[1]" title="支付宝">
                <input type="checkbox" name="pay[2]" title="微信">
                <input type="checkbox" name="pay[3]" title="银行卡">
            </div>
            <div class="layui-form-mid layui-word-aux">
                (收款方式)
            </div>

        </div>
        {if condition="$type eq 2"}
        <div class="layui-form-item" >
            <label class="layui-form-label">是否推荐</label>
            <div class="layui-input-block">
                <input type="radio" lay-filter="test" name="is_recommend" value="1" title="是"    checked >
                <input type="radio" lay-filter="test" name="is_recommend" value="0" title="否"    >
            </div>
        </div>
        {/if}
        <input type="hidden" name="type" value="{$type}">
        <div class="box-footer">
            {include file="layout/edit_btn_group"/}

        </div>

    </form>
</div>
<script>
    layui.use(['layer', 'form'], function(){
        layer=layui.layer;
        form = layui.form;
        //执行一个laydate实例
    });








</script>

<script>
    layui.use('form', function(){
        var form = layui.form;

        form.on('select(aihao)', function(data){
            console.log(data.elem); //得到select原始DOM对象
            console.log(data.value); //得到被选中的值
            console.log(data.othis); //得到美化后的DOM对象
            var strs= new Array(); //定义一数组
            strs=data.value.split("-");
            $('#price').val(strs[1]);

            form.render();
        });


    });


    function changevideo(v) {
        if(v==1){
            $('#video').show();
            $('#video_url').hide();
        }else{
            $('#video_url').show();
            $('#video').hide();
        }
    }
</script>
